﻿@{
    Layout = null;
    ViewBag.Title = "我的收藏";
    var list = ViewData["list"] as List<Pay.DTO.collect_dto>;
}
<html>
<head>
    <meta charset="UTF-8">
    <title>我的收藏</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
    <meta name="format-detection" content="telphone=no, email=no" />
    <meta name="full-screen" content="yes">
    <meta name="x5-fullscreen" content="true">
    <meta name="msapplication-tap-highlight" content="no">
    <link rel="stylesheet" type="text/css" href="~/Content/css/reset.css" />
    <link rel="stylesheet" type="text/css" href="~/Content/css/gelunbu.css" />
    <style type="text/css">
        .iptlf {
            float: left;
            margin-top: 40px;
            margin-left: 10px;
        }

        .mtjz {
            float: left;
            margin-top: 30px;
        }

        .mtjsh {
            float: left;
            width: 66%;
            height: 40px;
            font-size: 15px;
            line-height: 20px;
            margin-top: 38px;
            font-weight: normal;
            overflow: hidden;
            margin-left: 20px;
        }


        .delbtn {
            float: right;
            width: 47px;
            height: 47px;
            margin-top: 34px;
            background: url(/Content/images/wode_sc@2x.png) center center no-repeat;
            background-size: contain;
        }


        .back_contain .back_item {
            padding: 0 10px;
        }

            .back_contain .back_item a {
                color: #333
            }
    </style>
    <script src="~/Content/js/jquery-3.2.1.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="~/Content/js/layer/1.9.3/layer.js"></script>
    <script src="~/Content/js/web.js"></script>
    <script type="text/javascript">
        function del(id) {
            ajax({
                url: '/User/DelCollect',
                data: { ProductId: id },
                success_msg: "操作成功",
                fail_msg: "操作失败",
                actions:'refresh'
            });
        }
    </script>
</head>
<body>

    <div class="back_list_wrap">

        <ul class="back_contain">
            @if (list != null && list.Count > 0) {
                foreach (var item in list) {
                    var src = item.product.merchant.setting.oss_set.img_url + item.product.first_image;
                    <li class="back_item">
                        <a href="/Product/ProductDetail/@item.product_id">
                            <div class="back_info" style=" float: left; width: 80%;">
                                <img src="@src" width="60" height="60" class="mtjz" />
                                <h1 class="mtjsh">@item.product.name</h1>
                            </div>
                        </a>
                        <span class="delbtn" onclick="del('@item.product.id')"></span>
                    </li>
                }
            }
        </ul>
    </div>
</body>
</html>


